#include <iostream>
#include "udp.h"

class MyMap
{
public:
	MyMap();
	~MyMap();

public:
	typedef struct
	{
		bool busy;
		char macAddr[CPU_ID_SIZE + 1];
		struct sockaddr_in natAddr;
	}MapDataType;

#define MAX_MAP_DATA_NUM 10

public:
	bool checkExist(const char *macAddr) const;
	int insert(const char *macAddr, const struct sockaddr_in *natAddr);
	struct sockaddr_in get(const char *macAddr);

private:
	MapDataType _map[MAX_MAP_DATA_NUM];
};

